<template>
  <div v-if="show" style="text-align: center">
    <a-form :label-col="{ span: 6 }" :wrapper-col="{ span: 12 }" style="text-align: center">
      <a-row>
        <a-col :span="12">
          <a-form-item label="客户姓名">
            <a-input v-model="data.customerName" disabled />
          </a-form-item>
          <a-form-item label="实收金额">
            <a-input v-model="data.netReceiptsMoney" disabled />
          </a-form-item>
          <a-form-item label="结算单编号">
            <a-input v-model="data.balanceAccountsOrderNo" disabled />
          </a-form-item>
          <a-form-item label="应收余额">
            <a-input v-model="data.receivableSurplus" disabled />
          </a-form-item>
          <a-form-item label="本次核销">
            <a-input v-model="data.thisTimeVerification" disabled />
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item label="收款时间">
            <a-input v-model="data.makeCollectionsTime" disabled />
          </a-form-item>
          <a-form-item label="银行账户">
            <a-select
              show-search
              :allowClear="true"
              placeholder="请选择银行账户"
              option-filter-prop="children"
              v-model="data.bankAccountId"
              disabled
              style="width: 100%"
              :filter-option="filterOptionBankAccount">
              <a-select-option :value="item.id" v-for="(item,index) in accountData" :key="index">
                {{item.accountName}}
              </a-select-option>
            </a-select>
          </a-form-item>
          <a-form-item label="应收金额">
            <a-input v-model="data.receivableSurplus" disabled />
          </a-form-item>
          <a-form-item label="本次收款">
            <a-input v-model="data.thisTimeMoney" disabled />
          </a-form-item>
          <a-form-item label="备注">
            <a-textarea v-model="data.remark" :rows="3" disabled />
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>
<script>
  import { getAction } from '@/api/manage'
  export default {
    name: "ProjectPayment",
    data() {
      return {
        show: false,
        accountData: [],
        data: '',
        url: {
          getProjectPaymentById: '/ghProjectMakeCollectionsOrder/getById',
          queryAccountDataList: "/ghFinanceAccount/queryAllAccountList",
        }
      }
    },
    methods: {
      initData(params) {
        getAction(this.url.getProjectPaymentById, JSON.parse(params)).then(res => {
          if (res.success) {
            this.data = res.result;
          }
        });
      },
      initAccountData(){
        getAction(this.url.queryAccountDataList).then(res=>{
          if (res.success){
            this.accountData = res.result;
          }
        })
      },
      filterOptionBankAccount(input, option){
        return (
          option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
        );
      },
    }
  }
</script>
<style>

</style>